package com.meida.common.mybatis.model;

import com.meida.common.utils.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * update方法参数模型
 *
 * @author zyf
 * @date 2018/07/10
 */
@Data
@ApiModel(value = "UpdateModel", description = "update方法参数模型")
public class UpdateModel {
    @ApiModelProperty(value = "更新对象主键", dataType = "Long", required = true)
    private Long id;
    @ApiModelProperty(value = "接口扩展事件名称,具体用法参考使用文档", notes = "需要扩展接口时填写,并在子项目中实现UpdateInterceptor")
    private String handlerName;
    @ApiModelProperty("更新对象参数,传递示例:{\"name\":\"flyme\"}")
    private String params;
    @ApiModelProperty(value = "上传文件ID", dataType = "Long")
    private Long[] fileIds;

    public String getParams() {
        return StringUtils.unescapeHtml(this.params);
    }

    public void setParams(String params) {
        this.params = params;
    }
}
